﻿<%@ Page Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true" CodeFile="ProductActive.aspx.cs" Inherits="Admin_ProductActive" Title="Product Active Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style type="text/css">
        .style2
        {
            text-align: left;
        }
        .style3
        {
            text-align: left;
            height: 26px;
        }
        .style4
        {
            height: 26px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <table style="width:100%;">
        <tr>
            <td class="style2" width="20%">
                <asp:Label ID="Label1" runat="server" Text="Produce Name"></asp:Label>
            </td>
            <td style="text-align: left">
                <asp:TextBox ID="txtProName" runat="server" Width="244px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                    ControlToValidate="txtProName" ErrorMessage="Name is not blank"></asp:RequiredFieldValidator>
            </td>
            <td width="5%">
                <asp:TextBox ID="txtProID" runat="server" Visible="False" Width="53px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="style3">
                <asp:Label ID="Label2" runat="server" Text="Produce description"></asp:Label>
            </td>
            <td style="text-align: left" class="style4">
                <asp:TextBox ID="txtProDesc" runat="server" Width="241px"></asp:TextBox>
            </td>
            <td class="style4">
                </td>
        </tr>
        <tr>
            <td class="style2">
                <asp:Label ID="Label3" runat="server" Text="Produce price"></asp:Label>
            </td>
            <td style="text-align: left">
                <asp:TextBox ID="txtProPrice" runat="server" Width="237px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                    ControlToValidate="txtProPrice" ErrorMessage="RePrice is not blank"></asp:RequiredFieldValidator>
                <br />
                <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" 
                    ControlToValidate="txtProPrice" ErrorMessage="is numberic" 
                    ValidationExpression="^\d+$"></asp:RegularExpressionValidator>
            </td>
            <td style="font-size: large">
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style2">
                <asp:Label ID="Label4" runat="server" Text="Produce image's name"></asp:Label>
            </td>
            <td style="text-align: left">
                <asp:FileUpload ID="FileUpload1" runat="server" Width="215px" />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style2">
                <asp:Label ID="Label5" runat="server" Text="Produce warranty"></asp:Label>
            </td>
            <td style="text-align: left">
                <asp:TextBox ID="txtProWar" runat="server" Width="238px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                    ControlToValidate="txtProWar" ErrorMessage="warranty is not blank"></asp:RequiredFieldValidator>
                <br />
                <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                    ControlToValidate="txtProWar" ErrorMessage="is numberic" 
                    ValidationExpression="^\d+$"></asp:RegularExpressionValidator>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style2">
                <asp:Label ID="Label6" runat="server" Text="Produce in category"></asp:Label>
            </td>
            <td style="text-align: left">
                <asp:DropDownList ID="drdlCategory" runat="server">
                    <asp:ListItem>- - - - - - - - - - - - - - -</asp:ListItem>
                </asp:DropDownList>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style2">
                <asp:Button ID="btnAddProduct" runat="server" Text="Add product" 
                    onclick="btnAddProduct_Click" />
            </td>
            <td style="text-align: left">
                <asp:Button ID="btnUpdate" runat="server" onclick="btnUpdate_Click" 
                    Text="Update" />
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style2" colspan="3">
                <hr width="70%" />
            </td>
        </tr>
        <tr>
            <td class="style2" colspan="3">
                <asp:Panel ID="Panel1" runat="server">
                    <table style="width:100%;">
                        <tr>
                            <td width="15%">
                                <asp:Label ID="Label7" runat="server" Text="Select category"></asp:Label>
                            </td>
                            <td>
                                <asp:DropDownList ID="drdlCateViewPro" runat="server" AutoPostBack="True" 
                                    onselectedindexchanged="drdlCateViewPro_SelectedIndexChanged">
                                    
                                    <asp:ListItem>- - - - - - - - - - - - - - -</asp:ListItem>
                                    
                                </asp:DropDownList>
                            </td>
                            
                        </tr>
                        <tr>
                            <td colspan="2">
                                <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                                    CellPadding="4" Font-Size="Medium" ForeColor="#333333" GridLines="None" 
                                    onpageindexchanging="GridView1_PageIndexChanging" 
                                    onselectedindexchanged="GridView1_SelectedIndexChanged" 
                                    onrowupdating="GridView1_RowUpdating">
                                    <RowStyle BackColor="#EFF3FB" />
                                    <Columns>
                                        <asp:BoundField DataField="ProID" HeaderText="ProID" ReadOnly="True" 
                                            SortExpression="ProID" />
                                        <asp:BoundField DataField="ProName" HeaderText=" name" 
                                            SortExpression="ProName" />
                                        <asp:BoundField DataField="ProDesc" HeaderText="Description" 
                                            SortExpression="ProDesc" />
                                        <asp:BoundField DataField="ProDate" HeaderText=" datetime" 
                                            SortExpression="ProDate" />
                                        <asp:BoundField DataField="ProPrice" HeaderText="Price" 
                                            SortExpression="ProPrice" />
                                        <asp:BoundField DataField="ProImage" HeaderText=" image" 
                                            SortExpression="ProImage" />
                                        <asp:BoundField DataField="ProWarranty" HeaderText="warranty" 
                                            SortExpression="ProWarranty" />
                                        <asp:ButtonField CommandName="Select" Text="Edit Product" />
                                        <asp:ButtonField CommandName="Update" Text="Lock" />
                                    </Columns>
                                    <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                    <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                                    <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                                    <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                    <EditRowStyle BackColor="#2461BF" />
                                    <AlternatingRowStyle BackColor="White" />
                                </asp:GridView>
                            </td>
                            <td>
                                &nbsp;</td>
                            <td>
                                &nbsp;</td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                &nbsp;</td>
                            <td>
                                &nbsp;</td>
                            <td>
                                &nbsp;</td>
                        </tr>
                    </table>
                </asp:Panel>
            </td>
        </tr>
    </table>
</asp:Content>

